<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:p="http://primefaces.prime.com.tr/ui">

<ui:composition>


	<h:form prependId="false">

		<p:growl id="messages" showDetail="true" />

		<p:dataTable var="items" value="#{mUser.allAccount}" paginator="true"
			paginatorAlwaysVisible="false" id="user_table" rows="10"
			dynamic="true" onRowEditUpdate="messages"
			rowEditListener="#{mUser.updateRow}">

			<p:column>
				<f:facet name="header"></f:facet>
				<p:rowToggler />
			</p:column>

			<p:column sortBy="#{items.email}" filterBy="#{items.email}">
				<f:facet name="header">
					<h:outputText value="Email" />
				</f:facet>
				<h:outputText value="#{items.email}" />
			</p:column>

			<p:column sortBy="#{items.name}" filterBy="#{items.name}">
				<f:facet name="header">
					<h:outputText value="Name" />
				</f:facet>
				<h:outputText value="#{items.name}" />
			</p:column>

			<p:column sortBy="#{items.isVerified}">
				<f:facet name="header">Verified</f:facet>
				<p:cellEditor>
					<f:facet name="output">
						<h:outputText value="#{mUser.verifyToString(items.isVerified)}" />
					</f:facet>
					<f:facet name="input">
						<h:selectBooleanCheckbox value="#{items.isVerified}" />
					</f:facet>
				</p:cellEditor>
			</p:column>


			<p:column sortBy="#{items.status}">
				<f:facet name="header">Status</f:facet>
				<p:cellEditor>
					<f:facet name="output">
						<h:outputText value="#{mUser.validStatus(items.status)}" />
					</f:facet>
					<f:facet name="input">
						<h:selectBooleanCheckbox value="#{items.status}" />
					</f:facet>
				</p:cellEditor>
			</p:column>

			<p:column headerText="Edit">
				<p:rowEditor />
			</p:column>
			
			<p:rowExpansion>
				<div class="box3">
					<div class="image_box">
						<h:graphicImage value="#{mUser.getPath(items.accID)}"
							width="150" height="150"></h:graphicImage>
					</div>
					<div class="prop_info">
						<ul class="list1">
							<li><strong>Join Date: </strong> <h:outputText
									value="#{items.join_date}" /></li>
							<li><strong>Name: </strong> <h:outputText
									value="#{items.name}" /></li>
							<li><strong>ID Number: </strong> <h:outputText
									value="#{items.IDNumber}" /></li>
							<li><strong>Email: </strong> <h:outputText
									value="#{items.email}" /></li>
							<li><strong>Phone Number: </strong> <h:outputText
									value="#{items.phone}" /></li>
						</ul>
					</div>
				</div>
			</p:rowExpansion>

		</p:dataTable>

	</h:form>
</ui:composition>
</html>